home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / intro.D2.z / intro.D2
Encoding:
Text File  |  1998-10-30  |  2.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. iiiinnnnttttrrrroooo((((DDDD2222))))                                                            iiiinnnnttttrrrroooo((((DDDD2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _iiii_nnnn_tttt_rrrr_oooo_...._DDDD_2222 - introduction to driver entry point routines
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      This section describes the routines a developer needs to include in a
  17.      device driver or STREAMS module.
  18.  
  19. UUUUSSSSAAAAGGGGEEEE
  20.      The routines described in this section are called ``entry point
  21.      routines'' because they provide the interfaces that the kernel needs from
  22.      drivers and STREAMS modules.  The kernel calls these routines when
  23.      needed.  Some are called at well-defined times, such as system start up
  24.      and system shut down.  Others are called as a result of I/O-related
  25.      system calls or external events, such as interrupts from peripheral
  26.      devices.
  27.  
  28.      Each driver or module is organized into two logical parts: the base level
  29.      and the interrupt level.  The base level interacts with the kernel and
  30.      the device on behalf of processes performing I/O operations.  The
  31.      interrupt level interacts with the device and the kernel as a result of
  32.      an event such as data arrival, and usually cannot be associated with any
  33.      particular process.
  34.  
  35.      Each driver or module is uniquely identified by a prefix string specified
  36.      in its configuration file.  The name of all the driver-supplied routines
  37.      and global variables should begin with this prefix.  This will reduce the
  38.      chance of a symbol collision with another driver or module.  Any private
  39.      routines defined by a driver  or module that are not entry point routines
  40.      should be declared as _ssss_tttt_aaaa_tttt_iiii_cccc.  Also, any global variables that are
  41.      private to the driver or module should be declared as _ssss_tttt_aaaa_tttt_iiii_cccc.
  42.  
  43.      In general, any number of instances of the same driver (or module) entry
  44.      point routine can be running concurrently.  It is the responsibility of
  45.      the driver or module to synchronize access to its private data
  46.      structures.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.